package com.wsj.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;

import com.wsj.util.page.PageResultSet;
import com.wsj.web.vo.homeSite.HomeSiteAdBanner;

public interface IHomeSiteAdBannerDao {

public void add(HomeSiteAdBanner hs) throws DataAccessException;
	
	public void update(HomeSiteAdBanner hs) throws DataAccessException;
	
	public void delete(HomeSiteAdBanner hs) throws DataAccessException;
	
	public HomeSiteAdBanner loadHsAdBannerById(Integer id) throws DataAccessException;
	
	public List loadByNewsClassId(Long newsClassId) throws DataAccessException;
	
	public List loadByDiscriptId(Integer discriptId) throws DataAccessException;
	
	public PageResultSet loadPageList(Long newsClassId,Integer hsDesId,String title,Integer isImg,Short isLink,Short isJs,Integer page,Integer pageSize) throws DataAccessException;

	public List loadTopByNewsClassId(long newsClassId, int top)throws DataAccessException;

	public List loadTopByOnlyNewsClassId(long newsClassId, int top)throws DataAccessException;
	
	public List<HomeSiteAdBanner> loadTopByNewsClassId(Integer desId,Integer isPic, Integer top) throws DataAccessException;

	/**  
	 * 参数：广告源ID、广告描述ID、类型，向上或向下
	 * */
	public Boolean updateSequence(Integer adId,Integer adDesId,Integer typeId) throws DataAccessException;
	
	/***
	 * 通过广告分类名,广告描述名,图片还是文字,是否删除,前几个 ,查询广告列表
	 * @param newsClassName
	 * @param homeSiteAdBannerName
	 * @param picOrletter
	 * @param isdel
	 * @param top
	 * @return
	 * @throws DataAccessException
	 */
	public List loadHomeSiteAdBannerByClassNameDao(String newsClassName, String homeSiteAdBannerName, Short picOrletter, Short isdel, Integer top) throws DataAccessException;
	
}
